﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TR_TrainingCoursesDesDtls.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.TR_TrainingCoursesDesDtls" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>เพิ่มรายชื่อผู้เข้ารับการอบรม</title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 

    <style type="text/css">
        .style1
        {
            width: 131px;
        }
        .style2
        {
            width: 282px;
        }
    </style>

</head>
  
     <script type="text/javascript">   

    
           function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
          } 
          
</script>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>     
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="PanelA">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelA" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>
 
<asp:Panel ID="PanelA" runat="server">
    <asp:Label ID="lblID" runat="server" Visible="False"></asp:Label>
    <telerik:RadTabStrip ID="RadTabStrip1" 
        runat="server" 
        MultiPageID="RadMultiPage1"
        SelectedIndex="0" 
        CausesValidation="False" 
        Width="1000px"
        Skin="Office2007">
        <Tabs>
            <telerik:RadTab Text="ข้อมูลหลัก" Width="145px" Selected="True">
            </telerik:RadTab>
            <telerik:RadTab Text="รายชื่อผู้สมัคร" Width="145px">
            </telerik:RadTab>
            <telerik:RadTab Text="รายชื่อผู้มีสิทธิ์" Width="145px">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
<telerik:RadPageView ID="RadPageView4" runat="server"> 
<asp:Panel ID="Panel5" runat="server">
            <table cellpadding="0" cellspacing="0" width="1000">
              <tr>
              <td colspan="3">
                <div class="moduleDivSlim1000x450">
                <div class="moduleDivBottom1000">
                    <table align="center" width="980px">
                    <tr>
                        <td align="left" class="tableHeader">
                            ข้อมูลหลัก
                        </td>
                    </tr>
                    </table>        
                    <table align="center" style="width: 962px">
                        <tr>
                            <td>                             
                                <asp:Panel ID="Panel7" runat="server" Height="380px" ScrollBars="Auto" 
                                    Visible="true" Width="969px">
                                    <ul class="formList890px">
                                    <li>
                                        <table align="left" width="900px"> 
                                            <tr>
                                               <td align="right" style="width:35%">
                                                    หลักสูตรการอบรม :
                                                </td>
                                                <td>
                                                    <asp:Label ID="lbTrainingCourseDescr" runat="server" ForeColor="Blue"></asp:Label>
                                                </td>
                                            </tr> 
                                        </table>
                                    </li>                                
                                    <li>
                                    <table align="left" width="900px">
                                    <tr>
                                       <td align="right" style="width:35%">
                                            เปิดรับสมัครตั้งแต่วันที่ :
                                        </td>
                                        
                                        <td style="width:100px">
                                            <asp:Label ID="lbDateSignStard" runat="server" ForeColor="Blue"></asp:Label>
                                        </td>
                                            
                                        <td align="right">
                                            ถึง
                                        </td> 
                                        <td align="left">
                                            <asp:Label ID="lbDateSignEnd" runat="server" ForeColor="Blue"></asp:Label>
                                        </td>
                                    </tr>
                                    </table>
                                    </li>
                                    <li>
                                    <table align="left" width="900px">
                                    <tr>
                                       <td align="right" style="width:35%">
                                            อบรมตั้งแต่วันที่ :
                                        </td>
                                        
                                        <td style="width:100px">
                                            <asp:Label ID="lbDateTrainStard" runat="server" ForeColor="Blue"></asp:Label>
                                        </td>
                                            
                                        <td align="right">
                                            ถึง
                                        </td> 
                                        <td align="left">
                                            <asp:Label ID="lbDateTrainEnd" runat="server" ForeColor="Blue"></asp:Label>
                                        </td>
                                    </tr>
                                    </table>
                                    </li>                                                                    
                                    <%--<li>
                                    <table align="left" width="900px"> 
                                        <tr>
                                           <td align="right" style="width:35%">
                                            คะแนนเต็ม : 
                                        </td>                                    
                                        <td>
                                            <asp:Label ID="lbTotalScore" runat="server" ForeColor="Blue"></asp:Label>
                                        </td>
                                        </tr>
                                        </table>
                                    </li>
                                    <li>
                                      <table align="left" width="900px"> 
                                        <tr>
                                           <td align="right" style="width:35%">
                                                คะแนนผ่านเกณฑ์ :</td>                                        
                                            <td>
                                            <asp:Label ID="lbScoreAcceptable" runat="server" ForeColor="Blue"></asp:Label></td>
                                        </tr>
                                        </table>
                                    </li>               --%>                 
                                    <li>
                                     <table align="left" width="900px"> 
                                        <tr>
                                           <td align="right" style="width:35%">
                                            จำนวนผู้เข้ารับการอบรมที่รองรับได้สูงสุด :</td>
                                        
                                        <td>
                                            <asp:Label ID="lbMaxTrainee" runat="server" ForeColor="Blue"></asp:Label>&#160;&#160;คน</td>
                                        </tr>
                                        </table>
                                    </li>
                                    <li>
                                     <table align="left" width="900px"> 
                                        <tr>
                                           <td align="right" style="width:35%">
                                                    จำนวนคนในQuota :</td>
                                                
                                                <td>
                                                    <asp:Label ID="lbQuota" runat="server" ForeColor="Blue"></asp:Label>&#160;&#160;คน
                                                </td>
                                           </tr>
                                        </table>
                                    </li>
                                    <li>
                                     <table align="left" width="900px"> 
                                        <tr>
                                           <td align="right" style="width:35%">
                                                จำนวนผู้สมัคร :
                                            </td>
                                            <td>
                                                <asp:Label ID="lbTotalTrainee" runat="server" ForeColor="Blue"></asp:Label>&#160;&#160;คน
                                            </td>
                                        </tr>
                                            
                                        </table>
                                    </li>
                                    <li>
                                     <table align="left" width="900px"> 
                                        <tr>
                                           <td align="right" style="width:35%">
                                                จำนวนผู้มีสิทธิ์เข้ารับการอบรม :
                                            </td>
                                            
                                            <td>
                                                <asp:Label ID="lbAccepTrainee" runat="server" ForeColor="Blue"></asp:Label>&#160;&#160;คน
                                            </td>
                                        </tr>
                                        </table>
                                    </li>
                                    <li>
                                      <table align="left" width="900px"> 
                                        <tr>
                                           <td align="right" style="width:35%">
                                                ค่าใช้จ่ายประมาณในการอบรม :
                                            </td>
                                            <td>
                                                <asp:Label ID="lbTotalPrice" runat="server" ForeColor="Blue"></asp:Label>&#160;&#160;บาท
                                            </td>
                                        </tr>
                                        </table>
                                    </li>
                                    <li>
                                     <table align="left" width="900px"> 
                                        <tr>
                                           <td align="right" style="width:35%">
                                                    สถานที่ของการอบรม :
                                                </td>
                                                <td>
                                                    <asp:Label ID="lbSchedule" runat="server" ForeColor="Blue"></asp:Label>
                                                </td>
                                           </tr>
                                        </table>
                                    </li> 
                                    </ul> 
                                 </asp:Panel>
                            </td>    
                        </tr>            
                   </table>
                </div>
                </div>            
              </td>                                             
              </tr>         
             </table>
          </asp:Panel>
</telerik:RadPageView> 
<telerik:RadPageView ID="RadPageView1" runat="server">
    <asp:panel ID="Panel6" runat="server" >
    <table width="1000" cellpadding="0" cellspacing="0">
    <tr>
    <td colspan = "3">
        <div class="moduleDivSlim1000">
        <div class="moduleDivBottom1000">
        <table align="center" width ="980px" >
        <tr>
            <td align="left" class="tableHeader">
                รายชื่อผู้สมัครขอเข้ารับการอบรม</td>
        </tr>
        </table>
        <table width ="980px" align="center">
        <tr align="center">
        <td >
        <asp:Panel ID="PanelGrid2" 
            runat="server" 
            Width="980px" 
            Height="340px" ScrollBars="Auto" >
            <telerik:RadGrid ID="RadGrid2" runat="server" AllowFilteringByColumn="True" AllowAutomaticDeletes="True"
                AllowMultiRowEdit="True" AllowMultiRowSelection="True" AllowPaging="True" 
                AllowSorting="True" AutoGenerateColumns="False" EnableAJAX="True" 
                EnableAJAXLoadingTemplate="True" GridLines="None" 
                OnItemCommand="RadGrid2_ItemCommand" Skin="Outlook" Width="98%" 
                onitemdatabound="RadGrid2_ItemDataBound">
                <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" 
                        ClientDataKeyNames="train_seq" CommandItemDisplay="Top" DataKeyNames="train_seq" 
                        InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                        NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                        <CommandItemTemplate>
                            <table width="100%">
                                <tr>
                                    <td align="left" style="width:120px">
                                        <asp:LinkButton ID="AddInstitute" 
                                            runat="server" 
                                            CommandName="AddData" 
                                            Visible="true">
                                            <img alt="" src="../Images/Buttons/AddRecord.gif" 
                                                style="border:0px;vertical-align:middle;" /> เพิ่มรายการใหม่
                                        </asp:LinkButton>
                                    </td>
                                    <td align="left">
                                        <asp:Button id="btnReceive" 
                                            onclick="btnAddGranted_OnClick"                                                                                                                                                                                                                              
                                            runat="server" Width="130px" 
                                            CssClass="button" Text="เพิ่มรายชื่อผู้มีสิทธิ์" 
                                            Height="23px">
                                        </asp:Button>
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <%--<GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="train_seq" />
                                </GroupByFields>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldName="working_text" HeaderText="สังกัด"  />
                                </SelectFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>--%>
                        
                        <Columns>
                            <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
                                <HeaderStyle HorizontalAlign="Center" Width="15px" />
                                <ItemStyle HorizontalAlign="Center" />
                            </telerik:GridClientSelectColumn>
                            <telerik:GridTemplateColumn  
                                HeaderStyle-Width="15px"                                                             
                                HeaderStyle-HorizontalAlign="Center"
                                ShowFilterIcon="false"
                                AllowFiltering="false">                                                        
                                <ItemTemplate>
                                    <table>
                                        <asp:ImageButton 
                                            ID="cmdEdit" 
                                            runat="server" 
                                            CommandName="DataEdit"
                                            OnClientClick="javascript: return confirm('แก้ไขข้อมูลที่เลือก?');"
                                            ImageUrl="../Images/Buttons/Edit.gif" 
                                            ToolTip="แก้ไขรายการ"/>
                                    </table>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" Width="30px" />
                            </telerik:GridTemplateColumn>
                            
                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
                                ConfirmDialogType="RadWindow" ConfirmText="ลบข้อมูลที่เลือก?" 
                                Text="คลิกเพื่อลบข้อมูล" UniqueName="column1">
                                <HeaderStyle HorizontalAlign="Center" Width="15px" />
                                <ItemStyle HorizontalAlign="Center" Width="15px" />
                            </telerik:GridButtonColumn> 
                            
                            <telerik:GridBoundColumn DataField="trainee_seq" 
                                DataType="System.Int32" 
                                Display="False" 
                                ReadOnly="True" 
                                UniqueName="trainee_seq" 
                                Visible="False">
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn DataField="emp_seq" 
                                DataType="System.Int32" 
                                Display="False" 
                                ReadOnly="True" 
                                UniqueName="emp_seq" 
                                Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="FULL_NAME" HeaderText="ชื่อ-สกุล" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="FULL_NAME">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                               <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn DataField="working_text" HeaderText="สังกัด" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="JobSite">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="180px" />
                               <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                           
                            <telerik:GridBoundColumn DataField="position_text" HeaderText="ตำแหน่ง" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="Position">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="180px" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn DataField="class_text" HeaderText="ระดับ" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="Lavel">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="180px" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn DataField="granted"  
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="granted"
                               Visible="false">
                              
                            </telerik:GridBoundColumn>
                        </Columns>
                        <%--<EditFormSettings EditFormType="WebUserControl" 
                            UserControlName="../UserControls/TR_TrainingQuota.ascx">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>--%>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </MasterTableView>
                    <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                        EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                    </ClientSettings>
                </telerik:RadGrid>
            </asp:Panel>
        <asp:Panel ID="PanelAddData2" 
                runat="server"
                Height="380px"
                Visible="false" 
                width="956px" 
                align="center">
                    <ul class="formList890px">
                         <li>
                            <table align="center" style="width: 800px" >
                                <tr>
                                    <td align="left" class="tableDetailHeader" style="width: 980px">
                                        เพิ่มรายชื่อใหม่
                                    </td>
                                </tr>
                            </table>
                        </li>
                        <li>
                        <table style="width: 800px">
                            <tr>
                                <td>บุคลากรภายใน:</td>
                                <td align="left">
             <telerik:RadTextBox ID="txtTraineeSeq" runat="server" Visible="false" Width=" 100px"/>
            <asp:Panel runat="server" ID="pnlPerson">                      
            <telerik:RadComboBox runat="server" ID="cboPerson" Height="190px" Width="420px"
               MarkFirstMatch="true" EnableLoadOnDemand="true" DataValueField="emp_seq" 
               HighlightTemplatedItems="true"
               OnDataBound="cboPerson_DataBound" OnItemDataBound="cboPerson_ItemDataBound"
               OnItemsRequested="cboPerson_ItemsRequested">
               <HeaderTemplate>
                   <table>
                       <tr>
                           <td width="120px">ชื่อ-สกุล</td>
                           <td width="180px">ตำแหน่ง</td>
                           <td width="180px">สังกัด</td>
                           <td width="180px">ระดับ</td>
                       </tr>
                   </table>
               </HeaderTemplate>
               <ItemTemplate>
                     <table>
                       <tr>
                           <td width="160px"><%# DataBinder.Eval(Container.DataItem, "emp_name")%></td>
                           <td width="180px"><%# DataBinder.Eval(Container.DataItem, "pos_name")%></td>
                           <td width="180px"><%# DataBinder.Eval(Container.DataItem, "job_site_name")%></td>
                           <td width="180px"><%# DataBinder.Eval(Container.DataItem, "class_name")%></td>
                       </tr>
                   </table>
                </ItemTemplate>
               <FooterTemplate>
                    A total of
                    <asp:literal runat="server" id="RadComboItemsCount" />
                    items
               </FooterTemplate>
          </telerik:RadComboBox> 
          </asp:Panel> 

                                </td>
                            </tr>                                    
                             <tr> 
                                <td>
                                    
                                </td>
                                <td align="left">
                                      <asp:RadioButtonList 
                                        ID="rblAddPreson" 
                                        runat="server" 
                                        Visible="false"
                                        AutoPostBack="true"
                                        RepeatDirection="Horizontal"
                                        OnSelectedIndexChanged="rblAddPreson_SelectedIndexChanged">                                       
                                        <asp:ListItem Selected="True" Value="0">เพิ่มรายชื่อทีละคน</asp:ListItem>
                                        <asp:ListItem Value="1">เพิ่มรายชื่อทั้งหน่วยงาน</asp:ListItem>
                                     </asp:RadioButtonList>
                                </td>   
                            </tr>
                            <tr>  
                            <asp:Panel ID="PanelInPerson" runat="server" Visible="true">
                                <td align="right">
                                    บุคลากรภายใน:
                                </td>    
                                <td align="left">
                              <telerik:RadComboBox 
                                    runat="server" 
                                    ID="cbEmployeeList" 
                                    AllowCustomText ="true" 
                                    DataTextField="Full_Name" 
                                    DataValueField="EMP_SEQ" 
                                    Filter ="Contains"
                                    AutoPostBack="true"
                                    CausesValidation ="false"
                                    OnClientTextChange = "onTextChange"
                                    EmptyMessage="... เลือกบุคลากร ..."
                                    Width="360px" 
                                    ZIndex="8000" Height="200px" >
                                </telerik:RadComboBox>
                            </td>                                             
                                                  
                            </asp:Panel>                            
                            </tr>
                            <tr>  
                            <asp:Panel ID="PanelExPerson" runat="server" Visible="false" Width="200px">
                                <td align="right">
                                    บุคลากรภายนอก:
                                </td>                                                 
                                <td align="left" style="width: 444px">
                                    <telerik:RadTextBox ID="txtExPerson" runat="server" Width="300px"/>
                                </td> 
                            </asp:Panel> 
                            </tr>
                            <tr>
                            <asp:Panel ID="PanelJobSie" runat="server" Visible="false">
                                <td align="right">
                                    หน่วยงาน:
                                </td>                                                 
                                <td align="left">
                                <telerik:RadComboBox 
                                    runat="server" 
                                    ID="cbJobSite" 
                                    AllowCustomText ="true" 
                                    DataTextField="Name" 
                                    DataValueField="Sequence" 
                                    Filter ="Contains"
                                    AutoPostBack="true"
                                    CausesValidation ="false"
                                    OnClientTextChange = "onTextChange"
                                    EmptyMessage = "... เลือกหน่วยงาน..."
                                    Width="360px" 
                                    ZIndex="8000" Height="200px" >
                                </telerik:RadComboBox>
                                </td>
                            </asp:Panel>
                            </tr>                            
                            </table>  
                                                                    
                        <table width="600px">
                        <tr>
                            <td align="left">                                        
                                <asp:Label ID="lblError2" runat="server" ForeColor="Red" Font-Size="Small" Font-Bold="true" />
                            </td>                                     
                        </tr>
                        </table>
                        </li>
                    </ul>                                                                           
                  <table style="width: 646px">
                    <tr>                                    
                    <td align="right" style="width: 321px">
                        <asp:Button ID="btnSave2" onclick="btnSave2_Click" runat="server" CssClass="button" Text="บันทึก" Width="80px" />   
                        <asp:Button ID="btnUpdate2" onclick="btnUpdate2_Click" runat="server" CssClass="button" Visible="false" Text="แก้ไข" Width="80px" />                         
                    </td>
                    <td align="left">
                        <asp:Button ID="btnCancel2" OnClick="btnCancel2_Click" runat="server" CssClass="button" Text="ยกเลิก" Width="80px" />
                    </td>
                    </tr>
                </table>
            </asp:Panel> 
        </td>
        </tr>
        </table>
        </div>
        </div>
    </td>
    </tr>
    </table>
    </asp:panel>
</telerik:RadPageView>
<telerik:RadPageView ID="RadPageView2" runat="server" Width="100%">
    <asp:panel ID="Panel1" runat="server" >
    <table width="1000" cellpadding="0" cellspacing="0">
          <tr>
          <td colspan = "3">
        <div class="moduleDivSlim1000">
        <div class="moduleDivBottom1000">
        <table align="center" width ="980px" >
        <tr>
            <td align="left" class="tableHeader">
                รายชื่อผู้มิสิทธิ์เข้ารับการอบรม</td>
        </tr>
        </table>
        <table width ="980px" >
        <tr>
        <td >
        <asp:Panel ID="PanelGrid1" 
            runat="server" 
            Width="980px" 
            Height="340px" 
            ScrollBars="Auto" >
                <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowAutomaticDeletes="True"
                    AllowMultiRowEdit="True" AllowMultiRowSelection="True" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" EnableAJAX="True" 
                    EnableAJAXLoadingTemplate="True" GridLines="None" 
                    OnItemCommand="RadGrid1_ItemCommand" Skin="Outlook" Width="99%" 
                    onitemdatabound="RadGrid1_ItemDataBound">
                    <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" 
                        ClientDataKeyNames="train_seq" CommandItemDisplay="Top" DataKeyNames="train_seq" 
                        InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                        NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                        <CommandItemTemplate>
                            <table width="100%">
                                <tr>
                                    <td align="left">
                                        <%--<asp:LinkButton ID="AddInstitute" 
                                            runat="server" 
                                            CommandName="AddData" 
                                            Visible="true">
                                            <img alt="" src="../Images/Buttons/AddRecord.gif" 
                                                style="border:0px;vertical-align:middle;" /> เพิ่มรายการใหม่
                                        </asp:LinkButton>--%>
                                        &nbsp;
                                    </td>
                                    <td align="right">
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
  
                        <ExpandCollapseColumn Visible="True">
                        </ExpandCollapseColumn>
                        
                        <Columns>
                            <%--<telerik:GridTemplateColumn  
                                HeaderStyle-Width="15px"                                                             
                                HeaderStyle-HorizontalAlign="Center"
                                ShowFilterIcon="false"
                                AllowFiltering="false">                                                        
                                <ItemTemplate>
                                    <table>
                                        <asp:ImageButton 
                                            ID="cmdEdit" 
                                            runat="server" 
                                            CommandName="DataEdit"
                                            OnClientClick="javascript: return confirm('แก้ไขข้อมูลที่เลือก?');"
                                            ImageUrl="../Images/Buttons/Edit.gif" 
                                            ToolTip="แก้ไขรายการ" />
                                    </table>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" Width="15px" />
                            </telerik:GridTemplateColumn>--%>
                            
                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
                                ConfirmDialogType="RadWindow" ConfirmText="ลบข้อมูลที่เลือก?" 
                                Text="คลิกเพื่อลบข้อมูล" UniqueName="column1">
                                <HeaderStyle HorizontalAlign="Center" Width="15px" />
                                <ItemStyle HorizontalAlign="Center" Width="15px" />
                            </telerik:GridButtonColumn> 
                            
                            <telerik:GridBoundColumn DataField="trainee_seq" 
                                DataType="System.Int32" 
                                Display="False" 
                                ReadOnly="True" 
                                UniqueName="trainee_seq1" 
                                Visible="False">
                            </telerik:GridBoundColumn>
                
                            <telerik:GridBoundColumn DataField="emp_seq" 
                                DataType="System.Int32" 
                                Display="False" 
                                ReadOnly="True" 
                                UniqueName="emp_seq1" 
                                Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="FULL_NAME" HeaderText="ชื่อ-สกุล" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="FULL_NAME1">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn DataField="working_text" HeaderText="สังกัด" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="JobSite">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="180px" />
                               <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                           
                            <telerik:GridBoundColumn DataField="position_text" HeaderText="ตำแหน่ง" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="Position">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="180px" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn DataField="class_text" HeaderText="ระดับ" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               UniqueName="Lavel">
                               <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="180px" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            
                           <%--<telerik:GridBoundColumn DataField="" HeaderText="สังกัด/ตำแหน่ง/ระดับ" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                                UniqueName="">
                                <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>--%>
                        <%--<telerik:GridBoundColumn DataField="T_SCORE" HeaderText="ผลการอบรม" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                                UniqueName="T_SCORE">
                                <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>--%>
                        <%--<telerik:GridBoundColumn DataField="SUM_SCORE" HeaderText="คะแนนที่ได้" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                                UniqueName="SUM_SCORE"
                                Visible="false">
                                <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>--%>

                        <%--<telerik:GridBoundColumn DataField="train_hour" HeaderText="จำนวนชั่วโมง" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                                UniqueName="train_hour">
                                <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>--%>                            
                        </Columns>
                       <%-- <EditFormSettings EditFormType="WebUserControl" 
                            UserControlName="../UserControls/TR_TrainingTrainer.ascx">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>--%>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </MasterTableView>
                    <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                        EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                    </ClientSettings>
                </telerik:RadGrid>
        </asp:Panel>
        <asp:Panel ID="PanelAddData1" 
                runat="server"
                Height="380px"
                Visible="false" 
                width="956px" 
                align="center">
                    <ul class="formList890px">
                         <li>
                            <table align="center" style="width: 748px" >
                                <tr>
                                    <td align="left" class="tableDetailHeader" style="width: 980px">
                                        เพิ่มรายชื่อใหม่
                                    </td>
                                </tr>
                            </table>
                        </li>
                        <li>
                            <table style="width: 802px">
                            <tr>
                                <td>
                                    <telerik:RadTextBox ID="txtSequence" runat="server" Visible="false" Width=" 100px"/>
                                </td>
                            </tr>                                            
                            <tr>  
                                <td align="right" style="width: 200px">
                                    รายชื่อบุคลากร :
                                </td>                                                 
                                <td align="left">
                                    <telerik:RadComboBox 
                                        runat="server" 
                                        ID="cbTrainee" 
                                        AllowCustomText ="true" 
                                        DataTextField="FULL_NAME" 
                                        DataValueField="emp_seq" 
                                        Filter ="Contains"
                                        AutoPostBack="true"
                                        CausesValidation ="false"
                                        OnClientTextChange = "onTextChange"
                                        EmptyMessage = "... เลือกบุคลากร..."
                                        Width="260px" 
                                        ZIndex="8000" Height="80px" >
                                    </telerik:RadComboBox>
                                </td>
                            </tr>                            
                            <tr>
                            <td align="right">
                                จำนวนชั่วโมงที่เข้าอบรม (ชั่วโมง) :
                            </td>
                                <td align="left">
                                    <telerik:RadTextBox ID="txtTrainHour" runat="server" Width=" 80px"/>
                                </td>
                            </tr>
                            <tr> 
                                <td class="style1">
                                </td>
                                <td align="left">
                                      <asp:RadioButtonList 
                                        ID="rblTrainResult" 
                                        runat="server" 
                                        AutoPostBack="true"
                                        RepeatDirection="Horizontal">                                       
                                        <asp:ListItem Selected="True" Value="1">ผ่านการอบรม</asp:ListItem>
                                        <asp:ListItem Value="0">ไม่ผ่านการอบรม</asp:ListItem>
                                     </asp:RadioButtonList>
                                </td>   
                            </tr>
                            </table>  
                                                                    
                            <table width="600px">
                            <tr>
                                <td align="left">                                        
                                    <asp:Label ID="lbError1" runat="server" ForeColor="Red" Font-Size="Small" Font-Bold="true" />
                                </td>                                     
                            </tr>
                            </table>
                        </li>
                    </ul>                                                                           
                  <table style="width: 646px">
                    <tr>                                    
                    <td align="right" style="width: 321px">
                        <asp:Button ID="btnSave1" onclick="btnSave1_Click" runat="server" CssClass="button" Text="บันทึก" Width="80px" />   
                        <asp:Button ID="btnUpdate1" onclick="btnUpdate1_Click" runat="server" CssClass="button" Visible="false" Text="แก้ไข" Width="80px" />                         
                    </td>
                    <td align="left">
                        <asp:Button ID="btnCancel1" OnClick="btnCancel1_Click" runat="server" CssClass="button" Text="ยกเลิก" Width="80px" />
                    </td>
                    </tr>
                </table>
            </asp:Panel>
         </td>
        </tr>
        </table>
    </div>
   </div>
</td>
</tr>
</table>
</asp:panel>
</telerik:RadPageView>
</telerik:RadMultiPage>
 </asp:Panel>
</form>
</body>
</html>
